# <%=(item.getCaption())?item.getCaption():item.getTitle()%>(${item.getCodeName()})  <!-- {docsify-ignore-all} -->
<%if(item.getMemo()){%>

${ctx.ignoreNullString(item.getMemo())}
<%}%>

<% if (item.getRefControls()) {%>\

## 控件
<%  item.getRefControls().sort {it.getName()}.each{ control -> %>\
#### ${ctx.text('CtrlType',control.getControlType())}(${control.getName()})
<%if(control.getPSControlLogics()){%>\

##### 部件逻辑
<% control.getPSControlLogics().each{ controlLogic ->
if(controlLogic.getLogicType() == 'APPDEUILOGIC'){%>\
* `${controlLogic.getEventNames()}` : [${controlLogic.getPSAppDEUILogic().getName()}](module/${controlLogic.getPSAppDEUILogic().getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class).getPSSystemModule().getCodeName()}/${controlLogic.getPSAppDEUILogic().getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class).getCodeName()}/uilogic/${controlLogic.getPSAppDEUILogic().getCodeName()})
<%}%>\
<%if(controlLogic.getLogicType() == 'SCRIPT'){%>\
* `${controlLogic.getEventNames()}`
```
${controlLogic.getScriptCode()}
```
<%}%>\
<%}}%>\
<%if(control.getControlType() == 'FORM'){
if(control.getPSDEFormItemVRs()){ %>\

##### 值规则
<%  control.getPSDEFormItemVRs().each{ vr ->
 if(vr.getPSSysValueRule()){%>\
* `${vr.getPSDEFormItemName()}` : [${vr.getPSSysValueRule().getName()}](index/sys_value_rule_index#${vr.getPSSysValueRule().getCodeName()})
<%}%>\
<%if(vr.getPSDEFValueRule()){
 def rule = vr.getPSDEFValueRule()
 def entity = vr.getPSDEFValueRule().getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class)
 %>\
* `${vr.getPSDEFormItemName()}` : [${rule.getName()}](index/value_rule_index)
<%}%>\
<% }}
 def first = false
    control.loopFormDetails().each { detail ->
if(detail.getDetailType()=='FORMITEM' ){
 if(detail.getPSControlAttributes()) {
 if(!first){
    first = true
    out << '\n##### 属性注入'
 }
 detail.getPSControlAttributes().each { attr ->%>\

* `${detail.getCaption()?:detail.getName()}` 注入属性 `${attr.getAttrName()}`

```javascript
${attr.getAttrValue()}
```
<%}}}%>\
<% }} %>\
<% }} %>\
<% if (item.getPSAppViewLogics() || (item.getPSViewLayoutPanel() && item.getPSViewLayoutPanel().getPSAppViewLogics())) {
    def viewLogics = []
    if(item.getPSAppViewLogics()){
        viewLogics.addAll(item.getPSAppViewLogics())
    }
    if(item.getPSViewLayoutPanel() && item.getPSViewLayoutPanel().getPSAppViewLogics()){
        viewLogics.addAll(item.getPSViewLayoutPanel().getPSAppViewLogics())
    }
%>\

## 视图界面逻辑
<%  viewLogics.each{ logic -> %>\
<%if(logic.getLogicType() == 'SCRIPT'){%>\
* `${logic.getEventNames()}`
```javascript
${logic.getScriptCode()}
```
<%}%>\
<%if(logic.getPSAppUILogic() instanceof net.ibizsys.model.app.logic.IPSAppUINewDataLogic){%>\
  * ${logic.getName()}(预置新建数据逻辑)
<%} %>\
<%if(logic.getPSAppUILogic() instanceof net.ibizsys.model.app.logic.IPSAppUIOpenDataLogic){%>\
  * ${logic.getName()}(预置打开数据逻辑)
<%} %>\
<%if(logic.getPSAppDEUILogic()){%>\
  * [${logic.getPSAppDEUILogic().getName()}](module/${logic.getPSAppDEUILogic().getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class).getPSSystemModule().getCodeName()}/${logic.getPSAppDEUILogic().getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class).getCodeName()}/uilogic/${logic.getPSAppDEUILogic().getCodeName()})
<%}%>\
<%if(logic.getPSAppDEUIAction()){%>\
  * ${logic.getPSAppDEUIAction().getName()}
<%}%>\
<% }} %>
<% if (item.getRefs().uiactions) {%>\

### 关联界面行为
<%  item.getRefs().uiactions.each{ uiaction -> %>\
<%if(uiaction.getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class,true)){ %>\
  * [${uiaction.getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class).getDisplayName()}](module/${uiaction.getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class).getPSSystemModule().getCodeName()}/${uiaction.getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class).getCodeName()}) : [${uiaction.getName()}](module/${uiaction.getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class).getPSSystemModule().getCodeName()}/${uiaction.getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class).getCodeName()}#界面行为)
<%} else{ %>\
  * ${uiaction.getName()}(${uiaction.getCodeName()})
<%}%>\
<% }} %>\
<% if (item.getRefs().uilogics) {%>\

### 关联界面逻辑
<%  item.getRefs().uilogics.each{ uilogic -> %>\
  * [${uilogic.getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class).getDisplayName()}](module/${uilogic.getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class).getPSSystemModule().getCodeName()}/${uilogic.getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class).getCodeName()}) : [${uilogic.getName()}](module/${uilogic.getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class).getPSSystemModule().getCodeName()}/${uilogic.getParentPSModelObject(net.ibizsys.model.dataentity.IPSDataEntity.class).getCodeName()}/uilogic/${uilogic.getCodeName()})
<% }} %>\
<% if (item.getRefs().views) {%>\

### 关联视图
<%  item.getRefs().views.sort {it.getCodeName()}.each{ view -> %>\
  * [<%=(view.getCaption())?view.getCaption():view.getTitle()%>(${view.getCodeName()})](app/view/${view.getCodeName()})
<% }} %>\

<script>
 const { createApp } = Vue
  createApp({
    data() {
      return {

      }
    }
  }).use(ElementPlus).mount('#app')
</script>